package com.example.rule.db.entity;

import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author Jason - Chusifeng
 * @version 1.0.0
 * @className PymtRule.java
 * @packageName com.example.model.entity
 * @createTime 2022年10月09日 17:47:03
 * @description fee rule entity
 */
@Data
@Entity
@ToString(callSuper = true)
@Table(name = "pymt_rule",schema ="app_user")

public class PymtRule  {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "pk_pymt_rule")
    private Integer pkPymtRule;

    /**
     *  取个名字
     */
    @Column(name = "name")
    private String name;
    /**
     *  规则类型
     */
    @Column(name = "type")
    private Integer type;
    /**
     * 规则条件1
     */
    @Column(name = "operator1")
    private String operator1;
    /**
     * 条件1的值
     */
    @Column(name = "value1")
    private String value1;
    /**
     * 规则条件2
     */
    @Column(name = "operator2")
    private String operator2;
    /**
     *  条件2的值
     */
    @Column(name = "value2")
    private String value2;
    /**
     * 规则条件3 --预留
     */
    @Column(name = "operator3")
    private String operator3;
    /**
     * 条件3的值--预留
     */
    @Column(name = "value3")
    private String value3;
    /**
     * 费率/现金
     */
    @Column(name = "charge_type")
    private String chargeType;
    /**
     * 对应的值
     */
    @Column(name = "charge_value")
    private String chargeValue;
    /**
     * 优先级
     */
    @Column(name = "priority")
    private Integer priority;
    /**
     * 是否启用
     */
    @Column(name = "status")
    private Integer status ;

    /**
     * 条件之间的关系， and or
     */
    @Column(name = "connector")
    private String connector;
    /**
     * 该rule的condition需要什么工厂构建
     */
    @Column(name = "condition_name")
    private String conditionName;

}
